<?php defined('SYSPATH') or die('No direct script access.');

/**
 * Kotan exception handler containing methods to handle exceptions.
 * @author bagnz0r
 * @package Kotan
 */

class Exception_Handler extends Kohana {
	
	/**
	 * Handle exception
	 * @param Exception $e
	 */
	public static function handle($e)
	{
		// Message
		Kohana::$log->write('Error occured! Message: ' . $e->getMessage());
		
		// Line
		Kohana::$log->write('At line ' . $e->getLine() . ' in ' . $e->getFile());
		
		// Trace
		Kohana::$log->write('Trace: ' . "\n" . $e->getTraceAsString() . "\n\n");
		
		return false;
	}
}